package com.mytaobao.main.firsttab.func.guessyoulike;

import android.provider.BaseColumns;

import com.baseproject.datasource.local.database.dao.BaseDao;

import java.util.List;


public class ItemGuessYouLikeDao extends BaseDao<ItemGuessYouLike> {

    private static final String SQL_CREATE_ENTRIES =
            "CREATE TABLE IF NOT EXISTS " + Entry.TABLE_NAME + " (" +
                    Entry._ID + TEXT_TYPE + " PRIMARY KEY," +
                    Entry.COLUMN_NAME_ID + BOOLEAN_TYPE + COMMA_SEP +
                    Entry.COLUMN_NAME_TITLE + TEXT_TYPE + COMMA_SEP +
                    Entry.COLUMN_NAME_PRICE + FLOAT_TYPE + COMMA_SEP +
                    Entry.COLUMN_NAME_PAYED_COUNT + INTEGER_TYPE + COMMA_SEP +
                    Entry.COLUMN_NAME_COVER + TEXT_TYPE +
                    " )";

    @Override
    public List<ItemGuessYouLike> query(String[] columns, String where) {
        return super.query(columns, null);
    }

    /* Inner class that defines the table contents */
    public static abstract class Entry implements BaseColumns {
        public static final String TABLE_NAME = "guessyoulike";

        public static final String COLUMN_NAME_ID = "id";
        public static final String COLUMN_NAME_TITLE = "title";
        public static final String COLUMN_NAME_COVER = "coverUrl";
        public static final String COLUMN_NAME_PAYED_COUNT = "payedCount";
        public static final String COLUMN_NAME_PRICE = "price";
    }
}
